#ifndef _ZHONGDUN_XA_MSGHANDLER_H_
#define _ZHONGDUN_XA_MSGHANDLER_H_
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

#include "../../fep/type.h"
#include "../../fep/cli_main.h"


void sendMsgToZhongdunXa(U16 dateType, const char* buf, ssize_t len, char* output, ssize_t* outlen);
void handleMsgFromZhongdunXa(U16 dataType, const char * inMsgBuf, ssize_t inMsgSize, char* input, ssize_t *inLen);
I32 packSearchOneRecord(bool isMobile, I8 *buf, ZHONGDUNDATA data, I32 seqNum);
I32 packHistoryInformationAck(I8 *buf, ZHONGDUN_DB_LIST list);
I32 packOneDayRecordAck(I8 *buf, I32 fileSize);
I32 packRecordBySn(bool isMobile, ZHONGDUNLIST *list, U16 Sn, I8 *buf);
I32 packsuccssAck(I8 *buf);
I32 packUpgradePacket(ZHONGDUN_PACKET packet, I8 *buf);
I32 cleanZhongdunState();
#ifdef __cplusplus
}
#endif

#endif //_ZHONGDUN_XA_MSGHANDLER_H_
